package com.jman.register.controller;

import com.jman.register.dto.RegisterFormDTO;
import com.jman.register.dto.Result;
import com.jman.register.service.RegisterService;
import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping(("/register"))
public class RegisterController {
    @Resource
    private RegisterService registerService;

    @PostMapping("/register")
    public Result register(@RequestBody RegisterFormDTO registerFormDTO){
        return registerService.register(registerFormDTO);
    }
}
